

import java.util.GregorianCalendar;

/**
 * UE03 - Standesamt 
 * 
 * 
 * @author Benjamin Zwanzger
 * @verson 1.1
 */
public class TestDriver {

    public static void main(String[] args) {
        // 0 = Januar
        Person dagobert = new Person("Dagobert", "Duck", Gender.MALE, new GregorianCalendar(1960, 0, 1));
        Person donald = new Person("Donald", "Duck", Gender.MALE, new GregorianCalendar(1970, 0, 1));
        Person daisy = new Person("Daisy", "Queen", Gender.FEMALE, new GregorianCalendar(1980, 0, 1));
        Person truck = new Person("Truck", "Duck", Gender.MALE, new GregorianCalendar(2000, 5, 20));
        
        // Print all persons
        System.out.println(dagobert.toString());
        System.out.println(donald.toString());
        System.out.println(daisy.toString());
        System.out.println(truck.toString());
        System.out.println("------------------------");
        System.out.println();
        
        // nana dagobert, du kannst nicht jeden heiraten
        dagobert.marry(donald);
        System.out.println("dagobert.marry(donald);");
        // Print all persons
        System.out.println(dagobert.toString());
        System.out.println(donald.toString());
        System.out.println(daisy.toString());
        System.out.println(truck.toString());
        System.out.println("------------------------");
        System.out.println();
        
        // mit daisy funktioniert es sicher besser
        dagobert.marry(daisy);
        System.out.println("dagobert.marry(daisy);");
        // Print all persons
        System.out.println(dagobert.toString());
        System.out.println(donald.toString());
        System.out.println(daisy.toString());
        System.out.println(truck.toString());
        System.out.println("------------------------");
        System.out.println();
        
        // daisy hat die nase voll dem alten geizsack
        daisy.divorce();
        System.out.println("daisy.divorce();");
        // Print all persons
        System.out.println(dagobert.toString());
        System.out.println(donald.toString());
        System.out.println(daisy.toString());
        System.out.println(truck.toString());
        System.out.println("------------------------");
        System.out.println();
        
        // der junge truck ist wohl ein wenig zu jung um zu heiraten
        truck.marry(daisy);
        System.out.println("truck.marry(daisy);");
        // Print all persons
        System.out.println(dagobert.toString());
        System.out.println(donald.toString());
        System.out.println(daisy.toString());
        System.out.println(truck.toString());
        System.out.println("------------------------");
        System.out.println();
        
        // daisy versucht es mit donald
        daisy.marry(donald);
        System.out.println("daisy.marry(donald);");
        // Print all persons
        System.out.println(dagobert.toString());
        System.out.println(donald.toString());
        System.out.println(daisy.toString());
        System.out.println(truck.toString());
        System.out.println("------------------------");
        System.out.println();
        
        // der tollpatsch hats verbockt..
        daisy.divorce();
        System.out.println("daisy.divorce();");
        // Print all persons
        System.out.println(dagobert.toString());
        System.out.println(donald.toString());
        System.out.println(daisy.toString());
        System.out.println(truck.toString());
        System.out.println("------------------------");
        System.out.println();
        
        // daisy rennt zurück zum alten reichen dagobert
        dagobert.marry(daisy);
        System.out.println("dagobert.marry(daisy);");
        // Print all persons
        System.out.println(dagobert.toString());
        System.out.println(donald.toString());
        System.out.println(daisy.toString());
        System.out.println(truck.toString());
        System.out.println("------------------------");
        System.out.println();
        
        // zu spät für donald..
        donald.marry(daisy);
        System.out.println("donald.marry(daisy);");
        // Print all persons
        System.out.println(dagobert.toString());
        System.out.println(donald.toString());
        System.out.println(daisy.toString());
        System.out.println(truck.toString());
        System.out.println("------------------------");
        System.out.println();
        
        // truck will ausziehen und denkt er muss sich von dagobert scheiden lassen
        truck.divorce();
        System.out.println("truck.divorce();");
        // Print all persons
        System.out.println(dagobert.toString());
        System.out.println(donald.toString());
        System.out.println(daisy.toString());
        System.out.println(truck.toString());
        System.out.println("------------------------");
        System.out.println();
        
        
        // daisy und ihre ehen
        for (Marriage m : daisy.getMarriages()) {
            System.out.println(m.toString());
        }
    }
}
